﻿<%@ Page Title="Report Filters - Multimedia" Language="C#" MasterPageFile="~/user.master"
    AutoEventWireup="true" Inherits="MediaMonitor.Users.Report_All_Filter" CodeBehind="report-all-filter.aspx.cs" %>
<%--@ OutputCache Duration="3600" VaryByParam="none"--%>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Src="~/Controls/AutoCompleteExtender.ascx" TagPrefix="ctrl" TagName="AutoComplete" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Head" Runat="Server">
    <link href="../rad-scripts/Grid.MyCustomSkin.css" rel="stylesheet" type="text/css" />
    <link href="../rad-scripts/Input.MyCustomSkin.css" rel="stylesheet" type="text/css" />
    <link href="../rad-scripts/Menu.MyCustomSkin.css" rel="stylesheet" type="text/css" />
    <link href="../rad-scripts/slider.MyCustomSkin.css" rel="stylesheet" type="text/css" />
    <link href="../rad-scripts/Calendar.MyCustomSkin.css" rel="stylesheet" type="text/css" />
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">

            var sDate;
            var eDate;

            var totDay;
            function StartDateSelected(sender, eventArgs) {

                sDate =  eventArgs.get_renderDay().get_date() ;
               //eDate = sDate;

                var dfi = sender.DateTimeFormatInfo;
                var formattedDate = dfi.FormatDate(sDate, dfi.ShortDatePattern);

                var calE = $find("<%= calE.ClientID %>");

                calE.selectDate(sDate, true);

            }

            function EndDateSelected(sender, eventArgs) {

              eDate = eventArgs.get_renderDay().get_date() ;

            }

            function DateCheck() {
                alert(eDate.hours);
            }
              
        </script>
    </telerik:RadCodeBlock>
       
    <script type="text/javascript">
        function ShowHideDiv(div, show) {
            if (show) {
                div.style.display = 'block';
            }
            else {
                div.style.display = 'none';
               
            }

        }
</script>
    <style type="text/css">
#dvUploading{
   background: none repeat scroll 0 0 #606060;
    height: 100%;
    left: 0;
    margin: 0;
    padding: 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    opacity:0.5;
    display:none;
    
}
.dialog-loading-wrapper {
    background: none repeat scroll 0 0 rgba(0, 0, 0, 0);
    border: 0 none;
    height: 100px;
    left: 50%;
    margin-left: -50px;
    margin-top: -50px;
    position: fixed;
    top: 50%;
    width: 100px;
    z-index: 9999999;
}
.dialog-loading-icon {
    background-color: #FFFFFF !important;
    border-radius: 13px;
    display: block;
    height: 100px;
    line-height: 100px;
    margin: 0;
    padding: 1px;
    text-align: center;
    width: 280px;
}
        .dialog-loading-icon img
        {
            margin-top: 33px;
        }
    </style>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="Body" Runat="Server">

 
    
   
                           
<asp:Panel ID="pnlSearch" runat="server">
<div id="dvUploading"  class="dialog-background">
    <div class="dialog-loading-wrapper">
        <span class="dialog-loading-icon"> <img src='<%=Utility.AppPath%>/App_Themes/default/ajax/loading2.gif' alt="Loading"></img></span>
    </div>
</div> 
  
<table>
    <tr>
        <td colspan="2">
            <b>Dates</b><br /><br />
        </td>
    </tr>
    <tr>
        <td></td>
        <td>
            <table>
                <tr valign="top">
                    <td  style="padding-left:150px;">
                        From Date
                        <br />
                        <telerik:RadCalendar AutoPostBack="false" ID="calS" runat="server" EnableMultiSelect="false"
                            ClientEvents-OnDateSelected="StartDateSelected">
                        </telerik:RadCalendar>
                    </td>
                    <td><div style="width:50px;"></div></td>
                    <td >
                        To Date
                        <br />
                        <telerik:RadCalendar AutoPostBack="false" ID="calE" runat="server" EnableMultiSelect="false"
                            ClientEvents-OnDateSelected="EndDateSelected">
                        </telerik:RadCalendar>
                    </td>
                    
                     
                </tr>
                <tr>
                    <td colspan="3" style="padding-left:150px;">
                        <small><u class="ErrorText">Note:</u> only dates in blue color are valid dates having commercial's data.</small>
                    </td>
                </tr>
            </table>
        </td> 
    </tr>

   <tr><td colspan="2">
     <asp:UpdatePanel ID="pnlUpdate_ReportAllFilters" runat="server">
                    <ContentTemplate>
   <table width="100%">
   
     <tr>
        <td colspan="2"><br/>
        
        <b>Media</b><br /><br /></td>
        
    </tr>
    <tr>
   
        <td>Media Type<br /></td>
        <td>
           <asp:DropDownList ID="lstMediaType"  runat="server"
                AutoPostBack="true"
                onselectedindexchanged="lstMediaType_SelectedIndexChanged">
                <asp:ListItem Text="Multimedia" Value="0" Selected="True"></asp:ListItem>
                <asp:ListItem Text="Competition" Value="1"></asp:ListItem>
                </asp:DropDownList>
        </td>
    </tr>
    
    
    
    <tr valign="top" id="trMedia_TV" runat="server" visible="false">
        <td>
           TV Channels
        </td>    
        <td align="left" style="font-size:small;" >
            <script type="text/javascript">
                function chkAll_TV_Clicked(obj) {
                    var selected = document.getElementById('<%=chkAll_TV.ClientID%>').checked;

                    if (selected)
                        document.getElementById('dvList_TV').style.display = 'none';
                    else
                        document.getElementById('dvList_TV').style.display = 'block';
                }
            </script>
            <asp:CheckBox ID="chkAll_TV" runat="server" Text="Search from all TV Channels" Checked="false" />
             <span style="color:Green;padding-left:30px;">Last available date: <asp:Label runat="server" id="lblTVMax"></asp:Label></span>
            <div id="dvList_TV" style="display: none;" class="Box">
                <asp:CheckBoxList ID="lstMedia_TV" runat="server" DataValueField="MediaCode" DataTextField="MediaName"
                    RepeatColumns="5" RepeatDirection="Horizontal" Font-Size="8px">
                </asp:CheckBoxList>
                
            </div>
          
            
            
           
          
            <script type="text/javascript">
                document.getElementById('<%=chkAll_TV.ClientID%>').onclick = chkAll_TV_Clicked;
            </script>
            
            <br />
        </td>
      
    </tr>
    <tr valign="top" id="trMedia_Radio" runat="server" visible="false">
        <td>
            Radio Channels
        </td>
        <td style="font-size: small;">
            <script type="text/javascript">
                function chkAll_Radio_Clicked(obj) {
                    var selected = document.getElementById('<%=chkAll_Radio.ClientID%>').checked;

                    if (selected)
                        document.getElementById('dvList_Radio').style.display = 'none';
                    else
                        document.getElementById('dvList_Radio').style.display = 'block';
                }
            </script>
            <asp:CheckBox ID="chkAll_Radio" runat="server" Text="Search from all Radio Channels"
                Checked="false" />
                
            <span style="color:Green;padding-left:13px;">Last available date: <asp:Label runat="server" id="lblRadioMax"></asp:Label></span>
            <div id="dvList_Radio" style="display: none;" class="Box">
                <asp:CheckBoxList ID="lstMedia_Radio" runat="server" DataValueField="MediaCode" DataTextField="MediaName" RepeatColumns="5" RepeatDirection="Horizontal" Font-Size="8px">
                </asp:CheckBoxList>
            </div>


            <script type="text/javascript">
                document.getElementById('<%=chkAll_Radio.ClientID%>').onclick = chkAll_Radio_Clicked;
            </script>
            <br />
        </td>
    </tr>
    <tr valign="top" id="trMedia_Cable" runat="server" visible="false">
        <td>
            Cable Channels
        </td>
        <td style="font-size: small;">
            <script type="text/javascript">
                function chkAll_Cable_Clicked(obj) {
                    var selected = document.getElementById('<%=chkAll_Cable.ClientID%>').checked;

                    if (selected)
                        document.getElementById('dvList_Cable').style.display = 'none';
                    else
                        document.getElementById('dvList_Cable').style.display = 'block';
                }
            </script>
            <asp:CheckBox ID="chkAll_Cable" runat="server" Text="Search from all Cable Channels"
                Checked="false" />
                 <span style="color:Green;padding-left:13px;">Last available date: <asp:Label runat="server" id="lblCableMax"></asp:Label></span>
            <div id="dvList_Cable" style="display: none;" class="Box">
                <asp:CheckBoxList ID="lstMedia_Cable" runat="server" DataValueField="MediaCode" DataTextField="MediaName"
                    RepeatColumns="5" RepeatDirection="Horizontal" Font-Size="8px">
                </asp:CheckBoxList>
            </div>
           
            <script type="text/javascript">
                document.getElementById('<%=chkAll_Cable.ClientID%>').onclick = chkAll_Cable_Clicked;
            </script>
            <br />
        </td>
    </tr>

    <tr valign="top" id="trMedia_Press" runat="server" visible="false">
        <td>
            Press Media
        </td>
        <td style="font-size: small;">
            <script type="text/javascript">
                function chkAll_Press_Clicked(obj) {
                    var selected = document.getElementById('<%=chkAll_Press.ClientID%>').checked;
                    // 
                    if (selected)
                        document.getElementById('dvList_Press').style.display = 'none';
                    else
                        document.getElementById('dvList_Press').style.display = 'block';
                }
            </script>
            <asp:CheckBox ID="chkAll_Press" runat="server" Text="Search from all Press Media"
                Checked="false" />
                    <span style="color:Green;padding-left:35px;">Last available date: <asp:Label runat="server" id="lblPressMax"></asp:Label></span>
            <div id="dvList_Press" style="display: none;" class="Box">
                <asp:CheckBoxList ID="lstMedia_Press" runat="server" DataValueField="MediaCode" DataTextField="MediaName"
                    RepeatColumns="5" RepeatDirection="Horizontal" Font-Size="8px">
                </asp:CheckBoxList>
            </div>
         
            <script type="text/javascript">
                document.getElementById('<%=chkAll_Press.ClientID%>').onclick = chkAll_Press_Clicked;
            </script>
            <br />
        </td>
    </tr>
    <tr valign="top" id="trMedia_OutDoor" runat="server" visible="false">  <%-- style='display:<%=AppUser.GetCountry()==58 ? "" : "none"%>;' --%>
        <td>
            OutDoor Media
        </td>
        <td style="font-size: small;">
            <script type="text/javascript">
                function chkAll_OutDoor_Clicked(obj) {
                    var selected = document.getElementById('<%=chkAll_OutDoor.ClientID%>').checked;
                    //
                    if (selected)
                        document.getElementById('dvList_OutDoor').style.display = 'none';
                    else
                        document.getElementById('dvList_OutDoor').style.display = 'block';
                }
            </script>
            <asp:CheckBox ID="chkAll_OutDoor" runat="server" Text="Search from all OutDoor Media" Checked="false" />
                      <span style="color:Green;padding-left:19px;">Last available date: <asp:Label runat="server" id="lblOutdoorMax"></asp:Label></span>
            <div id="dvList_OutDoor" style="display: none;" class="Box">
                <asp:CheckBoxList ID="lstMedia_OutDoor" runat="server" DataValueField="MediaCode"
                    DataTextField="MediaName" RepeatColumns="5" RepeatDirection="Horizontal" Font-Size="8px">
                </asp:CheckBoxList>
            </div>
   
            <script type="text/javascript">
                document.getElementById('<%=chkAll_OutDoor.ClientID%>').onclick = chkAll_OutDoor_Clicked;
            </script>
            <br />
        </td>
    </tr>


    <tr valign="top" id="tr1" runat="server" visible="false">
        <td>
            Internet Media
        </td>
        <td style="font-size: small;">
            <script type="text/javascript">
                function chkAll_Internet_Clicked(obj) {
                    var selected = document.getElementById('<%=chkAll_Internet.ClientID%>').checked;
                    // 
                    if (selected)
                        document.getElementById('dvList_Internet').style.display = 'none';
                    else
                        document.getElementById('dvList_Internet').style.display = 'block';
                }
            </script>
            <asp:CheckBox ID="chkAll_Internet" runat="server" Text="Search from all Internet Media" Checked="false" />
                 <span style="color:Green;padding-left:21px;">Last available date: <asp:Label runat="server" id="lblInternetMax"></asp:Label></span>
            <div id="dvList_Internet" style="display: none;" class="Box">
                <asp:CheckBoxList ID="lstMedia_Internet" runat="server" DataValueField="MediaCode" DataTextField="MediaName"
                    RepeatColumns="5" RepeatDirection="Horizontal" Font-Size="8px">
                </asp:CheckBoxList>
            </div>
          
            <script type="text/javascript">
                document.getElementById('<%=chkAll_Internet.ClientID%>').onclick = chkAll_Internet_Clicked;
            </script>
            <br />
        </td>
    </tr>
       <tr valign="top" id="trMedia_CountrySide" runat="server" visible="false">
        <td>
          CountrySide Radio
        </td>    
        <td align="left" style="font-size:small;" >
            <script type="text/javascript">
                function chkAll_CountrySide_Clicked(obj) {
                    var selected = document.getElementById('<%=chkAll_Country.ClientID%>').checked;

                    if (selected)
                        document.getElementById('dvList_CountrySide').style.display = 'none';
                    else
                        document.getElementById('dvList_CountrySide').style.display = 'block';
                }
            </script>
            <asp:CheckBox ID="chkAll_Country" runat="server" Text="Search from all CountrySide Radio Channels" Checked="false" />
             <span style="color:Green;padding-left:30px;">Last available date: <asp:Label runat="server" id="lblCountryMax"></asp:Label></span>
            <div id="dvList_CountrySide" style="display: none;" class="Box">
                <asp:CheckBoxList ID="lstMedia_CountrySide" runat="server" DataValueField="MediaCode" DataTextField="MediaName"
                    RepeatColumns="5" RepeatDirection="Horizontal" Font-Size="8px">
                </asp:CheckBoxList>
                
            </div>
          
            
            
           
          
            <script type="text/javascript">
                document.getElementById('<%=chkAll_Country.ClientID%>').onclick = chkAll_CountrySide_Clicked;
            </script>
            
            <br />
        </td>
      
    </tr>
        <tr valign="top" id="trCountrySideOutDoor" runat="server" visible="false">
        <td>
          CountrySide OutDoor
        </td>    
        <td align="left" style="font-size:small;" >
            <script type="text/javascript">
                function chkAll_CountrySideOutDoor_Clicked(obj) {
                    var selected = document.getElementById('<%=chkAll_CountrySideOutDoor.ClientID%>').checked;

                    if (selected)
                        document.getElementById('dvList_CountrySideOutDoor').style.display = 'none';
                    else
                        document.getElementById('dvList_CountrySideOutDoor').style.display = 'block';
                }
            </script>
            <asp:CheckBox ID="chkAll_CountrySideOutDoor" runat="server" Text="Search from all CountrySide OutDoor Channels" Checked="false" />
             <span style="color:Green;padding-left:30px;">Last available date: <asp:Label runat="server" id="lblCountrySideOutDoor"></asp:Label></span>
            <div id="dvList_CountrySideOutDoor" style="display: none;" class="Box">
                <asp:CheckBoxList ID="lstMedia_CountrySideOutDoor" runat="server" DataValueField="MediaCode" DataTextField="MediaName"
                    RepeatColumns="5" RepeatDirection="Horizontal" Font-Size="8px">
                </asp:CheckBoxList>
                
            </div>
          
            
            
           
          
            <script type="text/javascript">
                document.getElementById('<%=chkAll_CountrySideOutDoor.ClientID%>').onclick = chkAll_CountrySideOutDoor_Clicked;
            </script>
            
            <br />
        </td>
      
    </tr>
     
    <tr>
        <td colspan="2">
            <br /><b>Products</b><br /><br />
        </td>
    </tr>

     
    <tr>
        <td colspan="2">
          <table>            
                <tr valign="top">
                    <td style="width: 133px;">Sector</td>
                    <td>
                    <asp:DropDownList ID="lstSector" runat="server" AutoPostBack="true" OnSelectedIndexChanged="lstSector_Changed"
                        DataTextField="SectorName" DataValueField="SectorName" />
                </td>
            
                </tr>
                <tr>
                <td>Sub Sector</td>
                <td>
                    <asp:DropDownList ID="lstSubSector" runat="server" AutoPostBack="true" OnSelectedIndexChanged="lstSubSector_Changed"
                        DataTextField="SubSectorName" DataValueField="SubSectorName" />
                        <br />
                </td>
            </tr>
                <tr style='display: <%=AppUser.GetCountry()==177 ? "table-row": "none" %>'>
                    <td>
                    Sub Sector 2
                </td>
                    <td>
                        <asp:DropDownList ID="lstSubSector2" runat="server" AutoPostBack="true" OnSelectedIndexChanged="lstSubSector_Changed"
                            DataTextField="SubSectorName" DataValueField="SubSectorName" />
                    <br />
                </td>
                </tr>
               
         
                <tr>
                <td>Category</td>
                <td>
                    <asp:DropDownList ID="lstCategory" runat="server" DataTextField="CategoryName" DataValueField="CategoryName" 
                     AutoPostBack="true" OnSelectedIndexChanged="lstCategory_SelectedIndexChanged"/>
                    
                </td>
            </tr>
        
    
  
    <asp:Panel runat="server" ID="PnlCompetitionBrands" Visible="false">
     <tr valign="top" id="tr2" runat="server">
        <td>
        Group By
        </td>    
        <td style="font-size:small;">
            <script type="text/javascript">
               
                    function chkCompetition_Clicked(obj) {
                        alert(obj);
                        var selected = document.getElementById('<%=chkCompetition.ClientID%>').checked;

                        if (selected)
                            document.getElementById('divCompetition').style.display = 'none';
                        else {
                            alert('wrking');
                            document.getElementById('divCompetition').style.display = 'block';
                        }
                    }
               
               
            </script>
            <asp:CheckBox ID="chkCompetition" runat="server" Text="Search from all products(List)" OnCheckedChanged="chkCompetition_CheckedChanged" AutoPostBack="true"   Checked="true" />&nbsp;&nbsp;
           <asp:CheckBox ID="chkAdvertiser" runat="server" Text="Search from all advertiser(List)" OnCheckedChanged="chkAdvertiser_CheckedChanged"  AutoPostBack="true"  />
            
            <div id="divCompetition" runat="server" visible="false"  class="Box">
                <asp:CheckBoxList ID="chkLstCompetition" runat="server" DataValueField="BrandName" DataTextField="BrandName"
                    RepeatColumns="3" RepeatDirection="Horizontal" Font-Size="8px">
                </asp:CheckBoxList>
                
            </div>
          
            <div id="divAdvertisersList" runat="server" visible="false"  class="Box">
             <asp:CheckBoxList ID="ChkAdvertiserList" runat="server" DataValueField="AdvertiserName" DataTextField="AdvertiserName"
                    RepeatColumns="3" RepeatDirection="Horizontal" Font-Size="8px">
                </asp:CheckBoxList>
            </div>
              <script type="text/javascript">
                  document.getElementById('<%=chkCompetition.ClientID%>').onclick = chkCompetition_Clicked;
            </script>
            
            <br />
        </td>
      
    </tr>
    </asp:Panel>
     
            </table>
             
        </td>
    </tr>
    
        <asp:Panel runat="server" ID="pnlforMultimedia">

        <tr>
            <td colspan="2">
                <br /><br />
            </td>
        </tr>
        <tr>
            <td>
                Advertiser
            </td>
            <td>
                <asp:DropDownList ID="lstAdvertiser" runat="server" DataTextField="AdvertiserName"
                    DataValueField="AdvertiserName" />
            </td>
        </tr>
        <tr>
            <td>
                Agency
            </td>
            <td>
                <asp:DropDownList ID="lstAgency" runat="server" DataTextField="AgencyName" DataValueField="AgencyName" />
            </td>
        </tr>
          
        <tr>
            <td colspan="2">
                <br />
                <br />
            </td>
        </tr>
       
        <tr >
            <td>
                <%--Brand--%> Product
            </td>
            <td>
                <ctrl:AutoComplete ID="acBrand" runat="server" MinimumPrefixLength="2"  
                    ServicePath="~/users/report-all-filter.aspx" ServiceMethod="AutoComplete_FillBrand"
                   completionsetcount="10" />

                   <asp:HiddenField runat="server" ID="hdnUserWriteProductName" />
            </td>
        </tr>
        <tr style="display:none;">
            <td>
                Product
            </td>
            <td>
                <ctrl:AutoComplete ID="acProduct" runat="server" MinimumPrefixLength="2"  
                    ServicePath="~/users/report-all-filter.aspx" ServiceMethod="AutoComplete_FillProduct"
                    completionsetcount="10" />
            </td>
        </tr>
        <tr style="display:none">
        <td>
            Version
        </td>
        <td>
            <ctrl:AutoComplete ID="acVersion" runat="server" MinimumPrefixLength="2" ServicePath="~/users/report-all-filter.aspx"
                ServiceMethod="AutoComplete_FillVersion" completionsetcount="10" />
        </td>
    </tr>
        <tr style="display:none;">
            <td colspan="4">
                <br />
                <br />
                <b>Options</b><br /><br /></td>
            
        </tr>
        
        <tr style="display:none;">
            <td>
                Price From
            </td>
            <td colspan="3">
                <asp:TextBox ID="tbPriceFrom" runat="server" Width="80"></asp:TextBox>
                <asp:RangeValidator ID="rvPriceFrom" runat="server" 
                    ControlToValidate="tbPriceFrom" Display="Dynamic" ErrorMessage="Invalid price" 
                    MaximumValue="9999" MinimumValue="0" Text="Invalid price" Type="Currency" />
                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; Price To &nbsp; &nbsp;
                <asp:TextBox ID="tbPriceTo" runat="server" Width="80"></asp:TextBox>
                <asp:RangeValidator ID="rvPriceTo" runat="server" ControlToValidate="tbPriceTo" 
                    Display="Dynamic" ErrorMessage="Invalid price" MaximumValue="9999" 
                    MinimumValue="0" Text="Invalid price" Type="Currency" />
            </td>
        </tr> 
         
        <tr style="display:none;">
    <td>Time:</td>
    <td colspan="3">
        <table>
        <tr>
            <td>
                Start Time
            </td>
            <td colspan="3">
                <asp:DropDownList ID="lstStartTime" runat="server">
                    <asp:ListItem Value="0">Any</asp:ListItem>
                    <asp:ListItem Value="20000">02:00</asp:ListItem>
                    <asp:ListItem Value="30000">03:00</asp:ListItem>
                    <asp:ListItem Value="40000">04:00</asp:ListItem>
                    <asp:ListItem Value="50000">05:00</asp:ListItem>
                    <asp:ListItem Value="60000">06:00</asp:ListItem>
                    <asp:ListItem Value="70000">07:00</asp:ListItem>
                    <asp:ListItem Value="80000">08:00</asp:ListItem>
                    <asp:ListItem Value="90000">09:00</asp:ListItem>
                    <asp:ListItem Value="100000">10:00</asp:ListItem>
                    <asp:ListItem Value="110000">11:00</asp:ListItem>
                    <asp:ListItem Value="120000">12:00</asp:ListItem>
                    <asp:ListItem Value="130000">13:00</asp:ListItem>
                    <asp:ListItem Value="140000">14:00</asp:ListItem>
                    <asp:ListItem Value="150000">15:00</asp:ListItem>
                    <asp:ListItem Value="160000">16:00</asp:ListItem>
                    <asp:ListItem Value="170000">17:00</asp:ListItem>
                    <asp:ListItem Value="180000">18:00</asp:ListItem>
                    <asp:ListItem Value="190000">19:00</asp:ListItem>
                    <asp:ListItem Value="200000">20:00</asp:ListItem>
                    <asp:ListItem Value="210000">21:00</asp:ListItem>
                    <asp:ListItem Value="220000">22:00</asp:ListItem>
                    <asp:ListItem Value="230000">23:00</asp:ListItem>
                    <asp:ListItem Value="240000">24:00</asp:ListItem>
                    <asp:ListItem Value="250000">25:00</asp:ListItem>
                    <asp:ListItem Value="260000">26:00</asp:ListItem>
                </asp:DropDownList>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                End Time &nbsp; &nbsp;
                <asp:DropDownList ID="lstEndTime" runat="server">
                    <asp:ListItem Value="0">Any</asp:ListItem>
                    <asp:ListItem Value="20000">02:00</asp:ListItem>
                    <asp:ListItem Value="30000">03:00</asp:ListItem>
                    <asp:ListItem Value="40000">04:00</asp:ListItem>
                    <asp:ListItem Value="50000">05:00</asp:ListItem>
                    <asp:ListItem Value="60000">06:00</asp:ListItem>
                    <asp:ListItem Value="70000">07:00</asp:ListItem>
                    <asp:ListItem Value="80000">08:00</asp:ListItem>
                    <asp:ListItem Value="90000">09:00</asp:ListItem>
                    <asp:ListItem Value="100000">10:00</asp:ListItem>
                    <asp:ListItem Value="110000">11:00</asp:ListItem>
                    <asp:ListItem Value="120000">12:00</asp:ListItem>
                    <asp:ListItem Value="130000">13:00</asp:ListItem>
                    <asp:ListItem Value="140000">14:00</asp:ListItem>
                    <asp:ListItem Value="150000">15:00</asp:ListItem>
                    <asp:ListItem Value="160000">16:00</asp:ListItem>
                    <asp:ListItem Value="170000">17:00</asp:ListItem>
                    <asp:ListItem Value="180000">18:00</asp:ListItem>
                    <asp:ListItem Value="190000">19:00</asp:ListItem>
                    <asp:ListItem Value="200000">20:00</asp:ListItem>
                    <asp:ListItem Value="210000">21:00</asp:ListItem>
                    <asp:ListItem Value="220000">22:00</asp:ListItem>
                    <asp:ListItem Value="230000">23:00</asp:ListItem>
                    <asp:ListItem Value="240000">24:00</asp:ListItem>
                    <asp:ListItem Value="250000">25:00</asp:ListItem>
                    <asp:ListItem Value="260000">26:00</asp:ListItem>
                </asp:DropDownList>
                <asp:CompareValidator ID="cvTime" runat="server" ControlToValidate="lstEndTime" ControlToCompare="lstStartTime"
                    Operator="GreaterThanEqual" Type="Integer" ErrorMessage="End Time must be greater"
                    Display="Dynamic" />
            </td>
        </tr>
    </table>
    </td>
</tr>

        <tr>
            <td></td>
            <td colspan="3">
            <br />
           <span style="font-size:10px;"> Download all the videos, audios, or images related to your:</span>
            <br />
                <asp:CheckBox ID="chkFirstAppearance" visible="false" runat="server" Checked="false" Text="Show only the first appearance of Product" />
                 <asp:CheckBox ID="chkDownload" runat="server" Checked="false" Text="category" Font-Bold="true"/>&nbsp;
                
                  <asp:CheckBox ID="chkDownloadProduct" runat="server" Checked="false" Text="product" Font-Bold="true"/>&nbsp;
                  
                   <asp:CheckBox ID="chkDownloadAdvertiser" runat="server" Checked="false" Text="advertiser" Font-Bold="true"/>
            </td>
        </tr>

        </asp:Panel>
   </table>

     </ContentTemplate>
         </asp:UpdatePanel>
   </td></tr>
     
   <tr>
       <td colspan="2">
           <asp:CheckBox Text="PPT GENERATOR" ID="chkppt" runat="server" />
       </td>
   </tr>
       
          
        <tr>
            <td></td>
            <td align="center">

                  <asp:ImageButton ID="btnSearch" runat="server" OnClick="btnSearch_Click" OnClientClick="showdiv('tblLoading1', 'dvB1g', true);" SkinID="Submit"  />
         
                <asp:UpdatePanel ID="pnlUpdate_Submit" runat="server" >
                    <ContentTemplate>
                            
                        <asp:Label ID="lblJavaScript" runat="server" Text=""></asp:Label> 
                        <asp:Label ID="lblErrorMsg" runat="server" Text="" ForeColor="red"></asp:Label>
                    </ContentTemplate>
                    <%--<Triggers>
                         <asp:PostBackTrigger ControlID="btnSearch" />
                    </Triggers>--%>
                </asp:UpdatePanel>
            </td>
        </tr> 

        <tr>
            <td></td>
            <td>
                
            </td>
        </tr>
</table>
  <div id="dvB1g" style="display: none; width: 100%; height: 100%; text-align: center;
                position: absolute; left: 0px; top: 0px;" class="GreyedOutCss">
            </div>
            <div id="tblLoading1" style="width: 250px; height: 100px; z-index: 100002;display:none;">
                <div style="background-image: url('<%=Utility.AppPath%>/App_Themes/default/ajax/loading-bg.png');
                    padding-top: 14px; padding-bottom: 18px; text-align: center; background-repeat: no-repeat;">
                    <br />
                    <div align="center">
                        <img src='<%=Utility.AppPath%>/App_Themes/default/ajax/loading2.gif' alt="Loading"></img>
                    </div>
                    <br />
                </div>
            </div>
    <script>
        function showdiv(tbl, dv, bool) {
            if (bool) {
                
                SetPostion(document.getElementById(tbl), 250, 150);
                SetPositionBg(document.getElementById(dv));
                document.getElementById(tbl).style.display = 'block';
                document.getElementById(dv).style.display = 'block';
                //document.getElementById('dvBg').style.display='block';
            }
            else {
                document.getElementById(tbl).style.display = 'none';
                //document.getElementById('dvBg').style.display='none';
            }
        }
        function swipe(url) {
            alert('Hello');
            window.open(url, '_blank');
        }
    </script>
  </asp:Panel>
                     
</asp:Content>

